Power supply selection/detection circuit

ABSTRACT

A power supply selection/detection circuit to select one main power supply from a plurality of external power supplies includes a resistance element with one end connected to an external power supply and another end connected to the main power supply, a first voltage detector to receive a voltage of the external power supply and detect a voltage of the external power supply, a second voltage detector to detect a voltage between the ends of the resistance element, and a switch connected between the external power supply and a ground to short-circuit or open-circuit between the external power supply and the ground according to an output of the second voltage detector. The resistance element and the first voltage detector are disposed for each of the plurality of external power supplies, and the second voltage detector and the switch are disposed for at least one of the plurality of external power supplies.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a power supply circuit of portabledevices and, particularly, to a circuit of selecting and detecting apower supply.

2. Description of Related Art

Recent information technology devices are reduced in size, and mobilecomputers, digital cameras, and storage devices with high portabilityare developed to thereby enable information interchange withinterconnection. Such portable devices are small sized to ensureportability, and therefore power is supplied through a power-suppliableinterface connector such as an AC adapter or USB (Universal Serial Bus).

Such a power supply system is oft-en designed to, for example, placehigh priority on a power supply, if any, from a power supply sourcededicated to providing a power supply only such as an AC adapter inorder to minimize the power consumption of a battery of a host computeror the like which is connected through an interface connector. Forinstance, a circuit to detect and select a power supply is placedbetween a portable device and a power supply source. Power supplyselection/detection circuits according to related arts are describedhereinafter.

FIG. 5 is a block diagram of a power supply selection/detection circuitaccording to a relate art. In the power supply selection/detectioncircuit 500, a voltage supplied from a power supply 511 or a powersupply 521 is applied to a load 501 through a main power supply 502. Thepower supply selection/detection circuit 500 includes a power supplydetector 510 disposed between the power supply 511 and the main powersupply 502, and a power supply detector 520 disposed between the powersupply 521 and the main power supply 502. The power supply detector 510includes a Schottky diode 512, a voltage comparator 513, and tworesistors 514 and 515. The power supply detector 520 includes a Schottkydiode 522, a voltage comparator 523, and two resistors 524 and 525.

The anode of the Schottky diode 512 is connected to the power supply511, and the cathode of the Schottky diode 512 is connected to the mainpower supply 502. The voltage comparator 513 detects the voltage of thepower supply 511 to determine the presence or absence of the powersupply 511. The voltage comparator 513 receives a reference power supplyvoltage Va1 and a voltage Va2 at a node between the resistors 514 and515 that divide by resistance the power supply 511. The anode of theSchottky diode 522 is connected to the power supply 521, and the cathodeof the Schottky diode 522 is connected to the main power supply 502. Thevoltage comparator 523 detects if power is supplied through the powersupply 521. One input terminal of the voltage comparator 523 receives areference power supply voltage Vb1, and the other input terminal of thevoltage comparator 523 receives a voltage Vb2 at a node between theresistors 524 and 525 that divide by resistance the power supply 521.

In this example, the power supply 511 is described as an AC adapter andthe power supply 521 as an USB connector, for example. Thus, when poweris supplied from an AC adapter, power supply from an interface is shutoff, for instance. The operation of the power supply selection/detectioncircuit 500 when the voltage supplied from the AC adapter is higher thanthe voltage supplied from the USB connector, which is when the powersupply 511 is higher than the power supply 521, is describedhereinafter. The voltage comparator 513 compares the reference voltageVa1 with the voltage Va2 at the node between the resistors 514 and 515to detect that the power supply 511 is supplied. On the other hand, thevoltage comparator 523 compares the reference voltage Vb1 with thevoltage Vb2 at the node between the resistors 524 and 525 to detect ifthe power supply 521 is supplied. If the power supply 521 is lower thanthe power supply 511, the voltage from the power supply 511 is suppliedpreferentially.

The operation of the power supply selection/detection circuit 500 whenonly the power supply voltage from the AC adapter is connected, which iswhen only the power supply 511 is connected, is described hereinafter.The voltage comparator 513 compares the reference voltage Va1 with thevoltage Va2 at the node between the resistors 514 and 515 to detect thatthe power supply 511 is being supplied. On the other hand, reverseleakage current Ir from the main power supply 502 flows to the Schottkydiode 522. Although diodes ideally transmit current in one directiononly, backward current flows slightly in practice. Accordingly, thevoltage Vb2 occurs at the node between the resistors 524 and 525. If thevoltage Vb2 at the node is not lower than the reference voltage Vb1, thevoltage comparator 523 falsely detects that power is being suppliedthrough the power supply 521. It is therefore necessary to set lowvalues to the resistors 524 and 525.

Another example of a power supply selection/detection circuit isdisclosed in Japanese Unexamined Patent Application Publication No.2000-284865. FIG. 6 is a block diagram of a power supplyselection/detection circuit disclosed therein. The power supplyselection/detection circuit illustrated in FIG. 6 includes a powersupply line 1 to supply power from an interface such as USB and a powersupply line 2 to supply power from an AC adapter. In this circuit also,power supply from the interface is shut off when power is supplied fromthe AC adapter. Thus, if the voltage of the power supply line 2increases, the current flows into the ground through a Zener diode 10.Accordingly, the base voltage of a transistor 17 increases due to the IRdrop across a resistor 12 to turn on the transistor 17. The base voltageof a transistor 18 thereby decreases to turn off the transistor 18,which then turns off a transistor 20. As a result, the power supply fromthe interface is shut off.

However, the inventor of the present invention has found that theabove-described related arts have the following problems. In the powersupply selection/detection circuit 500 illustrated in FIG. 5, if thevoltage supplied from the power supply 511 is higher than the voltagesupplied from the power supply 521, current flows to the resistors 524and 525 which are connected to the voltage comparator 523. This raisesthe problem that current consumption occurs in the power supply detector520 that is related to the power supply 521 which is not connected withthe main power supply 502. Although the consumption current can bereduced by increasing the resistance of the resistors 524 and 525, thiscauses another problem. For example, if the voltage is supplied from thepower supply 511 only, the reverse leakage current Ir from the mainpower supply 502 flows to the Schottky diode 522, and the voltage Vb2occurs at the node between the resistors 524 and 525. Thus, if thevoltage Vb2 at the node is not lower than the reference voltage Vb1, thevoltage comparator 523 can falsely detect that power is being suppliedthrough the power supply 521.

To avoid this, if the resistance of the resistor 525 is Rb2, the reverseleakage current of the Schottky diode is Ir, the reference voltage ofthe voltage comparator 523 is Vb1, it is necessary to set the resistanceof the resistor 525 to satisfy the expression: Rb2*Ir<Vb1, and thereforethe resistance of the resistor 525 cannot be set high enough. Thisraises the problem that the current consumed in the power supplydetector 520 cannot be reduced when power is supplied from the powersupply 511 to the main power supply 502. This not only increases thepower consumption in the circuit in the standby mode but also fails tosatisfy the current limit Imax of an USB connector in suspend mode ifthe power supply 521 is a USB connector.

The similar problem occurs in the configuration of the power supplyselection/detection circuit illustrated in FIG. 6. Because current keepsflowing through the resistors 11 and 12 while the AC adapter isconnected, power consumption occurs in a voltage detector 5. Althoughthe consumption current can be reduced by increasing the resistance ofthe resistors 11 and 12, this causes another problem. Specifically,diodes 8 and 9 are placed respectively on the power supply lines 1 and 2to prevent current backflow. Although the diodes ideally transmitcurrent in one direction only, backward current flows slightly inpractice. For example, if power is supplied through the power supplyline 1, the backward current occurs in the diode 9 and flows into theground through the resistors 11 and 12. Then, even though no power issupplied through the power supply line 2, the base voltage of thetransistor 17 increases due to the IR drop across the resistor 12. Thisturns off the transistor 18 and further turns off the transistor 20; asa result, the power supply from the power supply line 2 is shut off. Toavoid this, the resistance of the resistor 12 cannot be set high enough.Consequently, the current consumed in the power supplyselection/detection circuit cannot be reduced.

SUMMARY OF THE INVENTION

According to one aspect of the present invention, there is provided apower supply selection/detection circuit to select one main power supplyfrom a plurality of external power supplies, including a resistanceelement with one end connected to an external power supply and anotherend connected to the main power supply, a first voltage detector toreceive a voltage of the external power supply and detect a voltage ofthe external power supply, a second voltage detector to detect a voltagebetween the ends of the resistance element, and a switch connectedbetween the external power supply and a ground to short-circuit oropen-circuit between the external power supply and the ground accordingto an output of the second voltage detector. The resistance element andthe first voltage detector are disposed for each of the plurality ofexternal power supplies, and the second voltage detector and the switchare disposed for at least one of the plurality of external powersupplies. Such a configuration prevents the first voltage detector fromfalsely detecting an external power supply voltage.

This configuration enables the resistance of a voltage-dividing resistorthat divides by resistance an external power supply voltage to be sethigh, thereby allowing the provision of a power supplyselection/detection circuit with reduced current consumption.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects, advantages and features of the presentinvention will be more apparent from the following description taken inconjunction with the accompanying drawings, in which:

FIG. 1 shows the configuration of a power supply selection/detectioncircuit according to a first embodiment of the present invention;

FIG. 2 shows the detailed configuration of a power supplyselection/detection circuit according to the first embodiment of thepresent invention;

FIG. 3 shows the configuration of a power supply selection/detectioncircuit according to a second embodiment of the present invention;

FIG. 4 shows the configuration of a power supply selection/detectioncircuit according to a third embodiment of the present invention;

FIG. 5 shows the configuration of a power supply selection/detectioncircuit according to a related art; and

FIG. 6 shows the configuration of a power supply selection/detectioncircuit according to another related art.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The invention will be now described herein with reference toillustrative embodiments. Those skilled in the art will recognize thatmany alternative embodiments can be accomplished using the teaching ofthe present invention and that the invention is not limited to theembodiments illustrated for explanatory purposes.

First Embodiment

Exemplary embodiments of the present invention are describedhereinafter. The following description and the attached drawings areappropriately shortened and simplified to clarify the explanation.Redundant description is omitted as needed to clarify the explanation.

A first embodiment of the present invention is described hereinafterwith reference to the drawings. A power supply selection/detectioncircuit according to this embodiment is described, by way ofillustration, as a circuit which includes, as a load, a driver of a harddisk drive or microcomputer of a portable device and which is formed ona semiconductor device such as an LSI (Large Scale Integration) circuit.FIG. 1 shows the configuration of a power supply selection/detectioncircuit according to the first embodiment.

Referring first to FIG. 1, in a power supply selection/detection circuit100, the voltage supplied from a power supply 111 or a power supply 121is applied to a load 101 through a main power supply 102. The powersupply selection/detection circuit 100 includes a power supply detector110 disposed between the power supply 111 and the main power supply 102,and a power supply detector 120 disposed between the power supply 121and the main power supply 102. The power supply detector 110 includes aSchottky diode 112, a voltage comparator 113, and two resistors 114 and115. The power supply detector 110 includes a voltage detector 119,which includes the voltage comparator 113 and the two resistors 114 and115.

The power supply detector 120 includes a Schottky diode 122, two voltagecomparators 123 and 126, three resistors 124, 125 and 128, and a switch127. The power supply detector 120 includes a voltage detector 129,which includes the voltage comparator 123 and the resistors 124 and 125.

The power supply selection/detection circuit 100 supplies power to anexternal load 103 such as a hard disk drive or a microcomputer through aload 101 such as a DC/DC converter, LDO (Low Drop Out Regulator), or abattery charger. The power supply to the load 101 is not limited to thepower supplies 111 and 121 and a plurality of power supplies may beadded. The power, supply selection/detection circuit 100 excluding theSchottky diodes 112 and 122 may be formed integrally with an electriccircuit of the load 101 on a semiconductor device 104 such as LSI. Theresistors 114, 115, 124 and 125 may be connected outside thesemiconductor device 104.

The anode of the Schottky diode 112 is connected to the power supply111, and the cathode of the Schottky diode 112 is connected to the mainpower supply 102. The voltage comparator 113 detects the voltage of thepower supply 111 to determine the presence or absence of the powersupply 111. The voltage comparator 113 receives a reference power supplyvoltage Va1 and a voltage Va2 at a node between the resistors 114 and115 that divide by resistance the power supply 111. The other end of theresistor 114 is connected to the power supply 111, and the other end ofthe resistor 115 is grounded.

The anode of the Schottky diode 122 is connected to the power supply121, and the cathode of the Schottky diode 122 is connected to the mainpower supply 102. The input terminals of the voltage comparator 126 arerespectively connected to the power supply 121 on the anode side of theSchottky diode 122 and the main power supply 102 on the cathode side ofthe Schottky diode 122 so as to compare a voltage difference between thepower supply 121 and the main power supply 102. The output terminal ofthe voltage comparator 126 is connected to the switch 127. One end ofthe switch 127 is connected to the power supply 121, and the other endis grounded through the resistor 128. The resistor 128 may be placedbetween the switch 127 and the power supply 121. The voltage comparator123 detects the voltage of the power supply 121 to determine thepresence or absence of the power supply 121. The voltage comparator 123receives a reference power supply voltage Vb1 and a voltage Vb2 at anode between the resistors 124 and 125 that divide by resistance thepower supply 121. The other end of the resistor 124 is connected to thepower supply 121, and the other end of the resistor 125 is grounded.

The switch 127 is short-circuited or open-circuited according to theoutput from the voltage comparator 126 based on the comparison betweenthe voltage at the anode of the Schottky diode 122 and the voltage atthe cathode of the Schottky diode 122. Specifically, if the voltage ofthe power supply 121 is lower than the voltage of the main power supply102 (including when the power supply 121 is not inserted), the switch127 is short-circuited. If, on the other hand, the voltage of the powersupply 121 is higher than the voltage of the main power supply 102, theswitch 127 is open-circuited.

The resistor 128 connected to the switch 127 has sufficiently lowresistance with respect to the resistors 124 and 125 that serve asvoltage-dividing resistors for the power supply 121. The resistor 128 isplaced to deal with the Schottky diode reverse leakage current Ir, andif the reverse leakage current Ir is 120 μA or less, it is preferredthat the resistance Rb1 of the resistor 124 is 750 KΩ±20%, theresistance Rb2 of the resistor 125 is 250 KΩ±20%, and the resistance Rb3of the resistor 128 is 7.5 KΩ±20%.

The operation of the power supply selection/detection circuit 100 isdescribed hereinafter with reference to FIG. 1. In this embodiment, thepower supply 111 is described as an AC adapter and the power supply 121as an USB connector, for example. The operation of the power supplyselection/detection circuit 100 when the voltage supplied from the ACadapter is higher than the voltage supplied from the USB connector,which is when the power supply 111 is higher than the power supply 121,is described firstly.

When a voltage is supplied to the power supply 111, the voltage of themain power supply 102 is a voltage (e.g. about 0.2V) that is lower thanthe voltage of the power supply 111 by the amount of the forward voltagedrop VF of the Schottky diode 112 due to the PN junction in the Schottkydiode 112. The voltage comparator 113 compares the reference voltage Va1and the voltage Va2 at the node to thereby detect that power is beingsupplied to the power supply 111.

On the other hand, in the power supply detector 120, a voltage lowerthan that supplied to the power supply 111 is supplied to the powersupply 121. The voltage of the power supply 121 is thereby lower thanthe voltage of the main power supply 102, so that the switch 127 isshort-circuited according to the output of the voltage comparator 126.The voltage comparator 123 compares the reference voltage Vb1 and thevoltage Vb2 at the node to thereby determine the presence or absence ofthe power supply 121.

Referring still to FIG. 1, the operation of the power supplyselection/detection circuit 100 when only the power supply voltage fromthe AC adapter is connected, which is when only the power supply 111 isconnected, is described hereinafter. When a voltage is supplied to thepower supply 111, the voltage of the main power supply 102 is a voltagethat is lower than the voltage of the power supply 111 by the amount ofVF of the Schottky diode 112 due to the PN junction in the Schottkydiode 112. The voltage comparator 113 compares the reference voltage Va1and the voltage Va2 at the node to thereby detect that power is beingsupplied to the power supply 111.

On the other hand, in the power supply detector 120, no voltage issupplied to the power supply 121. The voltage of the power supply 121 isthereby lower than the voltage of the main power supply 102, so that theswitch 127 is short-circuited according to the output of the voltagecomparator 126. The voltage comparator 123 compares the referencevoltage Vb1 and the voltage Vb2 at the node to thereby determine thatthere is no power supply 121.

The reverse leakage current Ir from the main power supply 102 flows intothe Schottky diode 122. The resistor 128 connected to the switch 127 hassufficiently low resistance with respect to the resistors 124 and 125.Accordingly, the reverse leakage current Ir flows into the resistor 128through the short-circuited switch 127. This prevents the reverseleakage current Ir from flowing into the node between the resistors 124and 125. Therefore, the voltage Vb2 at the node does not exceed thereference voltage Vb1, thereby avoiding the false detection in thevoltage comparator 123.

If the power supply 111 is an AC adapter that is a dedicated line forpower supply, it is possible to form a circuit that preferentiallysupplies the power from the power supply 111 to the main power supply102 when power is connected to the power supply 111. For example, in thepower supply selection/detection circuit 100 illustrated in FIG. 2, atransistor 203 is connected between the cathode of the Schottky diode122 and the main power supply 102. The gate terminal of the transistor203 is connected to the output terminal of the voltage comparator 113 ofthe power supply detector 110. In this configuration, the transistor 203opens and closes according to the output from the voltage comparator 113and, if power is connected to the power supply 111, the power from thepower supply 111 is supplied preferentially. The polarity of thetransistor 203 may be N-channel or P-channel. Further, a resistor 202 tobe used for current detection or the like may be placed on the cathodeside of the Schottky diode 122. Preferably, one end of the resistor 202is connected to the cathode of the Schottky diode 122, and the other endof the resistor 202 is connected to the transistor 203.

Although the voltage comparator 126 detects the presence of absence ofan external power supply using a voltage difference after the VF dropdue to the PN junction in the Schottky diode 122, it is possible to usea voltage difference between the both ends of the resistor 202 or avoltage difference between the terminals of the transistor 203 shown inFIG. 2. It is also possible to use a voltage difference between theSchottky diode 122 and the resistor 202, a voltage difference betweenthe resistor 202 and the transistor 203, or a voltage difference betweenthe Schottky diode 122 and the transistor 203.

As described above, it is possible to prevent the reverse leakagecurrent Ir of the Schottky diode 122 from flowing into the resistors 124and 125 by the switch 127 which opens and closes according to a voltagedifference between the anode and the cathode of the Schottky diode 122and the resistor 128. Because the reverse leakage current Ir does notflow into the node between the resistors 124 and 125, the voltagecomparator 123 does not falsely detect that a voltage is being suppliedto the power supply 121. The resistance of the resistors 124 and 125 canbe therefore set high, which enables the reduction of the currentconsumed in the resistors 124 and 125. This reduces the powerconsumption in the power supply detector 120 in the standby mode orsuspend mode that is related to the power supply 121 which is notconnected with the main power supply 102.

The case where there is a limit to the current of the power supply 121in the standby mode or suspend mode is described hereinbelow. If theresistance of the resistor 124 is Rb1, the resistance of the resistor125 is Rb2, the current limit of the power supply 121 in the standby orsuspend mode is Imax, and the supply voltage of the power supply 121 isV, the resistance of the resistors 124 and 125 can be set to satisfy theequation: V/Imax≧(Rb1+Rb2). Thus, the current limit can be satisfied byincreasing the resistance of the resistors 124 and 125. This isparticularly effective when the power supply 121 is a USB connector, forexample.

To meet the standards of USB connectors, if a supply voltage is 4.3 to5.4 V and a current limit Imax is 500 μA, the value of Rb1+Rb2 ispreferably 8.6 to 10.8 KΩ or higher to satisfy the expressionV/Imax≧(Rb1+Rb2). However, the circuit to which the USB connectorsupplies a voltage during the suspend mode is not only the power supplyselection/detection circuit. Accordingly, the value of Rb1+Rb2 ispreferably 43 to 54 KΩ or higher (Imax is 100 μA or, less) and morepreferably 1 MΩ or higher (Imax is 4.3 to 5.4 μA or less).

Second Embodiment

A second embodiment of the present invention is described hereinafterwith reference to the drawings. In the second embodiment, as in thefirst embodiment, a power supply selection/detection circuit isdescribed, by way of illustration, as a circuit which includes, as aload, a driver of a hard disk drive or microcomputer of a portabledevice and which is formed on a semiconductor device such as an LSI.FIG. 3 shows the configuration of the power supply selection/detectioncircuit according to the second embodiment. The same circuit elements oroperating principles as in the first embodiment are not describedherein.

Referring to FIG. 3, in a power supply selection/detection circuit 300,the voltage supplied from the power supply 111 or the power supply 121is applied to the load 101 through the main power supply 102. The powersupply selection/detection circuit 300 includes a power supply detector310 disposed between the power supply 111 and the main power supply 102,and the power supply detector 120 disposed between the power supply 121and the main power supply 102. The power supply detector 310 includes avoltage comparator 316, a resistor 318, and a switch 317. The otherconfiguration is the same as that in the power supplyselection/detection circuit 100 of the first embodiment.

The power supply selection/detection circuit 300 supplies power to theexternal load 103 such as a hard disk drive or a microcomputer throughthe load 101 such as a DC/DC converter, LDO, or a battery charger. Asdescribed in the first embodiment, the power supply to the load 101 isnot limited to the power supplies 111 and 121 and a plurality of powersupplies may be added. Further, as in the first embodiment, the powersupply selection/detection circuit 300 excluding the Schottky diodes 112and 122 may be formed integrally with an electric circuit of the load101 on a semiconductor device such as LSI, and the resistors 114, 115,124 and 125 may be connected outside the semiconductor device.

The anode of the Schottky diode 112 is connected to the power supply111, and the cathode of the Schottky diode 112 is connected to the mainpower supply 102. The input terminal of the voltage comparator 316 isconnected to the power supply 111 on the anode side of the Schottkydiode 112, and the other input terminal of the voltage comparator 316 isconnected to the main power supply 102 on the cathode side of theSchottky diode 112 so as to compare a voltage difference between thepower supply 111 and the main power supply 102. The output terminal ofthe voltage comparator 316 is connected to the switch 317. One end ofthe switch 317 is connected to the power supply 111, and the other endis grounded through the resistor 318. The resistor 318 may be placedbetween the switch 317 and the power supply 111. The voltage comparator113 detects the voltage of the power supply 111 to determine thepresence or absence of the power supply 111. The voltage comparator 113receives a reference power supply voltage Vb1 and a voltage Vb2 at anode between the resistors 114 and 115 that divide by resistance thepower supply 111. The other end of the resistor 114 is connected to thepower supply 111, and the other end of the resistor 115 is grounded.

The switch 317 is short-circuited or open-circuited according to theoutput from the voltage comparator 316 based on the comparison betweenthe voltage at the anode of the Schottky diode 112 and the voltage atthe cathode of the Schottky diode 112. Specifically, if the voltage ofthe power supply 111 is lower than the voltage of the main power supply102 (including when the power supply 111 is not inserted), the switch317 is short-circuited. If, on the other hand, the voltage of the powersupply 111 is higher than the voltage of the main power supply 102, theswitch 317 is open-circuited. The operation of the switch 127 is thesame as that of the first embodiment.

The resistor 318 connected to the switch 317 has sufficiently lowresistance with respect to the resistors 114 and 115 that serve asvoltage-dividing resistors for the power supply 111. The resistor 318 isplaced to deal with the reverse leakage current Ir of the Schottkydiode, and if the reverse leakage current Ir is 120 μA or less, it ispreferred that the resistance Ra1 of the resistor 114 is 750 KΩ±20%, theresistance Ra2 of the resistor 115 is 250 KΩ±20%, and the resistance Ra3of the resistor 318 is 7.5 KΩ±20%.

The operation of the power supply selection/detection circuit 300 isdescribed hereinafter with reference to FIG. 3. In this embodiment, thepower supply 111 is described as an AC adapter and the power supply 121as an USB connector, for example. The operation of the power supplyselection/detection circuit 300 when the voltage supplied from the ACadapter is higher than the voltage supplied from the USB connector,which is when the power supply 111 is higher than the power supply 121,is described firstly.

When a voltage is supplied to the power supply 111, the voltage of themain power supply 102 is a voltage that is lower than the voltage of thepower supply 111 by the amount of the VF of the Schottky diode 112 dueto the PN junction in the Schottky diode 112. The voltage of the powersupply 111 is thereby higher than the voltage of the main power supply102, and the switch 317 is open-circuited according to the output fromthe voltage comparator 316. The voltage comparator 113 compares thereference voltage Va1 and the voltage Va2 at the node to thereby detectthat power is being supplied to the power supply 111.

On the other hand, in the power supply detector 120, a voltage lowerthan that supplied to the power supply 111 is supplied to the powersupply 121. The voltage of the power supply 121 is thereby lower thanthe voltage of the main power supply 102, so that the switch 127 isshort-circuited according to the output of the voltage comparator 126.The voltage comparator 123 compares the reference voltage Vb1 and thevoltage Vb2 at the node to thereby determine the presence or absence ofthe power supply 121.

Referring still to FIG. 3, the operation of the power supplyselection/detection circuit 300 when only the power supply voltage fromthe AC adapter is connected, which is when only the power supply 111 isconnected, is described hereinafter. When a voltage is supplied to thepower supply 111, the voltage of the main power supply 102 is a voltagethat is lower than the voltage of the power supply 111 by the amount ofVF of the Schottky diode 112 due to the PN junction in the Schottkydiode 112 in the power supply detector 310. Accordingly, the voltage ofthe power supply 111 is higher than the voltage of the main power supply102, and the switch 317 is open-circuited according to the output fromthe voltage comparator 316. The voltage comparator 113 compares thereference voltage Va1 and the voltage Va2 at the node to thereby detectthat power is being supplied to the power supply 111.

On the other hand, in the power supply detector 120, no voltage issupplied to the power supply 121. The voltage of the power supply 121 isthereby lower than the voltage of the main power supply 102, so that theswitch 127 is short-circuited according to the output of the voltagecomparator 126. The voltage comparator 123 compares the referencevoltage Vb1 and the voltage Vb2 at the node to thereby determine thatthere is no power supply 121.

The reverse leakage current Ir from the main power supply 102 flows intothe Schottky diode 122. The resistor 128 connected to the switch 127 hassufficiently low resistance with respect to the resistors 124 and 125.Accordingly, the reverse leakage current Ir flows into the resistor 128through the short-circuited switch 127. This prevents the reverseleakage current Ir from flowing into the node between the resistors 124and 125. Therefore, the voltage Vb2 at the node does not exceed thereference voltage Vb1, thereby avoiding the false detection in thevoltage comparator 123.

The power supply selection/detection circuit 300 shown in FIG. 3 mayinclude the transistor 203 shown in FIG. 2 (not shown in FIG. 3) betweenthe Schottky diode 122 and the main power supply 102. In thisconfiguration, if the power supply 111 is an AC adapter that is adedicated line for power supply, it is possible to form a circuit thatpreferentially supplies the power from the power supply 111 to the mainpower supply 102 when power is connected to the power supply 111 asdescribed in the first embodiment. The circuit of FIG. 3 may furtherinclude the resistor 202 shown in FIG. 2.

Although the voltage comparator 126 detects the presence or absence ofan external power supply using a voltage difference after the VF dropdue to the PN junction in the Schottky diode 122, it is possible to usea voltage difference between the both ends of the resistor (not shown)between the Schottky diode 122 and the main power supply 102, or avoltage difference between the terminals of the transistor (not shown).It is also possible to use a voltage difference between the Schottkydiode 122 and the resistor, a voltage difference between the resistorand the transistor, or a voltage difference between the Schottky diode122 and the transistor, as described in the first embodiment.

In this configuration, the second embodiment has the same advantage asthe first embodiment.

Further, because the switch 317 is open-circuited in the power supplydetector 310 related to the power supply 111 which is connected to themain power supply 102, no current flows into the voltage comparator 316and the resistor 318. Accordingly, adding the voltage comparator 316,the resistor 318 and the switch 317 to the power supply detector 310does not cause an increase in power consumption.

Third Embodiment

A third embodiment of the present invention is described hereinafterwith reference to the drawings. In the third embodiment, as in the firstembodiment, a power supply selection/detection circuit is described, byway of illustration, as a circuit which includes, as a load, a driver ofa hard disk drive or microcomputer of a portable device and which isformed on a semiconductor device such as an LSI. FIG. 4 shows theconfiguration of the power supply selection/detection circuit accordingto the third embodiment. The same circuit elements or operatingprinciples as in the first embodiment are not described herein.

Referring to FIG. 4, in a power supply selection/detection circuit 400,the voltage supplied from a power supply 411 or a power supply 421 isapplied to a load 401 through a main power supply 402. The power supplyselection/detection circuit 400 includes a power supply detector 410disposed between the power supply 411 and the main power supply 402, anda power supply detector 420 disposed between the power supply 421 andthe main power supply 402. The power supply detector 410 includes aSchottky diode 412, two voltage comparators 413 and 416, two resistors414 and 415, and a switch 417. The power supply detector 410 includes avoltage detector 419, which includes the voltage comparator 413 and thetwo resistors 414 and 415.

The power supply detector 420 includes a Schottky diode 422, two voltagecomparators 423 and 426, and two resistors 424 and 425, and a switch427. The power supply detector 420 includes a voltage detector 429,which includes the voltage comparator 423 and the resistors 424 and 425.

The power supply selection/detection circuit 400 supplies power to anexternal load (not shown) such as a hard disk drive or a microcomputerthrough the load 401 such as a DC/DC converter, LDO, or a batterycharger as described in the first embodiment. The power supply to theload 401 is not limited to the power supplies 411 and 421 and aplurality of power supplies may be added. The power supplyselection/detection circuit 400 excluding the Schottky diodes 412 and422 may be formed integrally with an electric circuit of the load 401 ona semiconductor device such as LSI, and the resistors 414, 415, 424 and425 may be connected outside the semiconductor device as described inthe first embodiment.

The anode of the Schottky diode 412 is connected to the power supply411, and the cathode of the Schottky diode 412 is connected to the mainpower supply 402. The voltage comparator 413 detects the voltage of thepower supply 411 to determine the presence or absence of the powersupply 411. The voltage comparator 413 receives a reference power supplyvoltage Va1 and a voltage Va2 at a node between the resistors 414 and415 that divide by resistance the power supply 411. The input terminalof the voltage comparator 416 is connected to the power supply 411 onthe anode side of the Schottky diode 412, and the other input terminalof the voltage comparator 416 is connected to the main power supply 402on the cathode side of the Schottky diode 412 so as to compare a voltagedifference between the power supply 411 and the main power supply 402.The output terminal of the voltage comparator 416 is connected to theswitch 417. One end of the switch 417 is connected to the power supply411, and the other end of the switch 417 is connected to the resistor414, the resistor 415, and then grounded. Although not shown, the switch417 may be placed between the resistor 414 and the input terminal of thevoltage comparator 413.

The anode of the Schottky diode 422 is connected to the power supply421, and the cathode of the Schottky diode 422 is connected to the mainpower supply 402. The voltage comparator 423 detects the voltage of thepower supply 421 to determine the presence or absence of the powersupply 421. The voltage comparator 423 receives a reference power supplyvoltage Vb1 and a voltage Vb2 at a node between the resistors 424 and425 that divide by resistance the power supply 421. The input terminalof the voltage comparator 426 is connected to the power supply 421 onthe anode side of the Schottky diode 422, and the other input terminalof the voltage comparator 426 is connected to the main power supply 402on the cathode side of the Schottky diode 422 so as to compare a voltagedifference between the power supply 421 and the main power supply 402.The output terminal of the voltage comparator 426 is connected to theswitch 427. One end of the switch 427 is connected to the power supply421, and the other end of the switch 427 is connected to the resistor424, the resistor 425, and then grounded. Although not shown, the switch427 may be placed between the resistor 424 and the input terminal of thevoltage comparator 423. Further, the switch 427 may be placed betweenthe input terminal of the voltage comparator 423 and the resistor 425,or between the resistor 425 and the ground.

The switch 417 is short-circuited or open-circuited according to theoutput from the voltage comparator 416 based on the comparison betweenthe voltage at the anode of the Schottky diode 412 and the voltage atthe cathode of the Schottky diode 412. Specifically, if the voltage ofthe power supply 411 is lower than the voltage of the main power supply402 (including when the power supply 411 is not inserted), the switch417 is open-circuited. If, on the other hand, the voltage of the powersupply 411 is higher than the voltage of the main power supply 402, theswitch 417 is short-circuited.

The switch 427 is short-circuited or open-circuited according to theoutput from the voltage comparator 426 based on the comparison betweenthe voltage at the anode of the Schottky diode 422 and the voltage atthe cathode of the Schottky diode 422. Specifically, if the voltage ofthe power supply 421 is lower than the voltage of the main power supply402 (including when the power supply 421 is not inserted), the switch427 is open-circuited. If, on the other hand, the voltage of the powersupply 421 is higher than the voltage of the main power supply 402, theswitch 427 is short-circuited.

The operation of the power supply selection/detection circuit 400 isdescribed hereinafter with reference to FIG. 4. In this embodiment, thepower supply 411 is described as an AC adapter and the power supply 421as an USB connector, for example. The operation of the power supplyselection/detection circuit 400 when the voltage supplied from the ACadapter is higher than the voltage supplied from the USB connector,which is when the power supply 411 is higher than the power supply 421,is described firstly.

When a voltage is supplied to the power supply 411, the voltage of themain power supply 402 is a voltage that is lower than the voltage of thepower supply 411 by the amount of the VF of the Schottky diode 412 dueto the PN junction in the Schottky diode 412. The voltage of the powersupply 411 is thereby higher than the voltage of the main power supply402, and the switch 417 is short-circuited according to the output fromthe voltage comparator 416. Accordingly, current flows from the powersupply 411 to the ground through the resistors 414 and 415. The voltageVa2 at the node is thereby higher than the reference voltage Va1, andthe voltage comparator 413 detects that power is being supplied to thepower supply 411.

On the other hand, in the power supply detector 420, a voltage lowerthan that supplied to the power supply 411 is supplied to the powersupply 421. The voltage of the power supply 421 is thereby lower thanthe voltage of the main power supply 402, so that the switch 427 isopen-circuited according to the output of the voltage comparator 426.Accordingly, the voltage Va2 at the node does not increase but stays atthe ground level, and thereby the power supply detector 420 does notdetect that power is being supplied to the power supply 421 based on thecomparison result in the voltage comparator 423. If the switch 427 isplaced between the voltage comparator 423 and the ground, though notshown, the voltage Vb2 at the node is fixed to about a power supplyvoltage level while the switch 427 is open-circuited. Thus, the powersupply detector 420 can invert the logic of the voltage comparator 423so as not to detect that power is being supplied to the power supply421.

The operation of the power supply selection/detection circuit 400 whenonly the power supply voltage from the AC adapter is connected, which iswhen only the power supply 411 is connected, is described hereinafter.When a voltage is supplied to the power supply 411, the voltage of themain power supply 402 is a voltage that is lower than the voltage of thepower supply 411 by the amount of VF of the Schottky diode 412 due tothe PN junction in the Schottky diode 412 in the power supply detector410. Accordingly, the voltage of the power supply 411 is higher than thevoltage of the main power supply 402, and the switch 417 isshort-circuited according to the output from the voltage comparator 416.Accordingly, current flows from the power supply 411 to the groundthrough the resistors 414 and 415. The voltage Va2 at the node isthereby higher than the reference voltage Va1, and the voltagecomparator 413 detects that power is being supplied to the power supply411 in the power supply detector 410.

On the other hand, in the power supply detector 420, no voltage issupplied to the power supply 421. The voltage of the power supply 421 isthereby lower than the voltage of the main power supply 402, so that theswitch 427 is open-circuited according to the output of the voltagecomparator 426. Accordingly, the voltage Va2 at the node does notincrease but stays at the ground level, so that the power supplydetector 420 does not detect that power is being supplied to the powersupply 421 based on the comparison result in the voltage comparator 423.If the switch 427 is placed between the voltage comparator 423 and theground, though not shown, the voltage Va2 at the node is fixed to abouta power supply voltage level while the switch 427 is open-circuited.Thus, the power supply detector 420 can invert the logic of the voltagecomparator 423 so as not to detect that power is being supplied to thepower supply 421.

Reverse leakage current Ir from the main power supply 402 flows into theSchottky diode 422. However, because the switch 427 is open-circuited,the reverse leakage current Ir does not flows into the node between theresistors 424 and 425. Therefore, the voltage Vb2 at the node does notexceed the reference voltage Vb1, thereby avoiding the false detectionin the voltage comparator 423.

The power supply selection/detection circuit 400 shown in FIG. 4 mayinclude the transistor 203 and the resistor 202 shown in FIG. 2 (notshown in FIG. 4) between the Schottky diode 422 and the main powersupply 402. In this configuration, the voltage comparator 426 candetermine the presence or absence of an external power supply using notonly a voltage difference after the VF drop due to the PN junction inthe Schottky diode 422, but also a voltage difference between the bothends of the resistor or a voltage difference between the terminals ofthe transistor. It is also possible to use a voltage difference betweenthe Schottky diode 422 and the resistor, a voltage difference betweenthe resistor and the transistor, or a voltage difference between theSchottky diode 422 and the transistor, as described in the firstembodiment.

As described above, it is possible to prevent the reverse leakagecurrent Ir of the Schottky diode 422 from flowing into the resistors 424and 425 by the switch 427 which opens and closes according to a voltagedifference between the anode and the cathode of the Schottky diode 422.Because the reverse leakage current Ir does not flow into the nodebetween the resistors 424 and 425, the voltage comparator 423 does notfalsely detect that a voltage is being supplied to the power supply 421.The resistance of the resistors 424 and 425 can be therefore set high,which enables the reduction of the current consumed in the resistors 424and 425. This reduces the power consumption in the power supply detector420 in the standby mode or suspend made that is related to the powersupply 421 which is not connected with the main power supply 402.

Similarly, the configuration allows the resistance of the resistors 414and 415 to be set high, which enables the reduction of the currentflowing into the resistors 414 and 415 while the power supply 411 isconnected to the main power supply 402. As a result, power consumptioncan be reduced in the power supply detector 410 related to the powersupply 411 which is connected with the main power supply 402 as well.

If the resistance of the resistors 414 and 424 and the resistance of theresistors 415 and 425 when there is a limit to the current of the powersupplies 411 and 421 in the standby or suspend mode are Rb1 and Rb2,respectively, the current limit of the power supplies 411 and 421 in thestandby or suspend mode is Imax, and the supply voltage of the powersupplies 411 and 421 is V, V/Imax≧(Rb1+Rb2). The resistance of theresistors 414, 415, 424 and 425 can be set to satisfy this equation asdescribed in the first embodiment.

The present invention is particularly suitable for application toportable devices or the like, and may be applied to any devices to whichpower is supplied from external sources.

It is apparent that the present invention is not limited to the aboveembodiment and it may be modified and changed without departing from thescope and spirit of the invention.

1. A power supply selection/detection circuit to select one externalpower supply from a plurality of external power supplies, comprising:for each of the plurality of external power supplies, a resistanceelement with one end connected to a respective one of the external powersupplies and another end connected to a main power supply line, and afirst voltage detector to receive a voltage of the respective externalpower supply and detect a voltage of the respective external powersupply; and for at least one of the plurality of external powersupplies, a second voltage detector to detect a voltage between the endsof the resistance element, and a switch connected between the respectiveexternal power supply and a ground to short-circuit or open-circuitbetween the respective external power supply and the ground according toan output of the second voltage detector, wherein the switch has one endconnected to a further resistor and is open-circuited if a voltage fromthe at least one of the plurality of external power supplies exceeds avoltage on the main power supply line and short-circuited if a voltagefrom the at least one of the plurality of external power supplies isless than a voltage on the main power supply line.
 2. The power supplyselection/detection circuit according to claim 1, wherein for each ofthe plurality of external power supplies, the first voltage detectorincludes a first voltage-dividing resistor and a second voltage-dividingresistor connected to the ground, and resistance of the further resistorconnected to the switch is lower than a total of resistance of the firstvoltage-dividing resistor and the second voltage-dividing resistor. 3.The power supply selection/detection circuit according to claim 2,wherein for each of the plurality of external power supplies,V/Imax≧(R1+R2) is satisfied when a current limit is Imax, a supplyvoltage is V, resistance of the first voltage-dividing resistor is R1,and resistance of the second voltage-dividing resistor is R2.
 4. Thepower supply selection/detection circuit according to claim 3, whereinat least one of the plurality of external power supplies is a USB(Universal Serial Bus) interface connector.
 5. The power supplyselection/detection circuit according to claim 4, wherein the currentlimit (Imax) of the USB interface connector is 500 μA and the supplyvoltage (V) of the USB interface connector is 4.3 to 5.4 V, and a totalof resistance (R1+R2) of the first voltage-dividing resistor and thesecond voltage-dividing resistor is 8.6 KΩ or higher.
 6. The powersupply selection/detection circuit according to claim 1, wherein theresistance element is one selected from a Schottky diode, a resistor,and a transistor.
 7. A method of selecting a power supply from aplurality of external power supplies by a detection circuit to supply avoltage to a load through a power supply line, each of the plurality ofexternal power supplies including a first power supply and a secondpower supply, the detection circuit having a first voltage detector thatreceives a voltage of the first power supply and detects a voltage ofthe first power supply, a second voltage detector that receives avoltage of the second power supply and detects a voltage of the secondpower supply, a first resistance element with one end connected to thefirst power supply and a second end connected to the power supply line,and a second resistance element with one end connected to the secondpower supply and a second end connected to the power supply line, themethod comprising: connecting the first power supply to the power supplyline to supply a voltage to the load; monitoring a voltage between thefirst and second ends of the second resistance element; and connectingthe second power supply to a ground when a result of the monitoringindicates that a voltage of the power supply line is less than a voltageof the second power supply.
 8. The method of claim 7, wherein the stepof connecting the second power supply to ground comprises continuing toconnect the first power supply to the power supply line after the resultof the monitoring indicates that a voltage of the power supply line isless than a voltage of the second power supply.